//
//  MatchModel.h
//  Mahjong
//
//  Created by 饶首建 on 17/5/22.
//  Copyright © 2017年 com.ikamobile.com. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PlayerModel.h"

typedef void(^LoadMatchSuccess)(id model);
typedef void(^LoadMatchFail)(NSString *errorStr);


@interface MatchModel : NSObject

@property (nonatomic,assign) NSInteger base;

@property (nonatomic,assign) NSInteger ceiling;

@property (nonatomic,assign) BOOL isSeted;

@property (nonatomic,copy) NSString *matchCode;

@property (nonatomic,strong) NSArray *rules;
@property (nonatomic,strong) NSArray *optionalArr;
@property (nonatomic,copy) NSString *matchId;
@property (nonatomic,strong) NSArray *players;
@property (nonatomic,strong) NSArray *others;
@property (nonatomic,strong) PlayerModel *me;

@property (nonatomic,copy) NSNumber *startDate;


+ (MatchModel*)parseDic:(NSDictionary*)dic;

+ (void)findOneMatchSuccess:(LoadMatchSuccess)success fail:(LoadMatchFail)fail;
+ (void)findMatchByGameId:(NSString*)gameId success:(LoadMatchSuccess)success fail:(LoadMatchFail)fail;

@end
